<?php
	$url = "http://localhost:8080/moms-diary/services/signup";
	//TODO: lu bikin form do yang punya field kaya dibawah ini, format tanggal dd-mm-yyyy;
	$query = http_build_query(
			array(
				"password" => "4123",
				"newpassword" => "4123",
				"birthDate" => "22-10-1984", 
				"gender" => "female",
				"mobileNo" => "12315252",
				"babyName" => "aqila",
				"babyBirthDate" => "22-10-2012")
			);

	$ch = curl_init($url);
	curl_setopt($ch, CURLOPT_HEADER, true);
	curl_setopt($ch, CURLOPT_POST, true);
	//TODO: isi username dan password dari hasil login nya. yang ini punya gw
	curl_setopt($ch, CURLOPT_USERPWD, 'rm.herwidodo@gmail.com:m*VhIPWWre');

	curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $query);

	$data = curl_exec($ch);
	$return =  curl_getinfo($ch);

	print_r($data);
	curl_close($ch);

?>
